package cn.bdqn.utils;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class RedisUtil {
    @Resource
    RedisTemplate redisTemplate;

    public void set(String key,Object vaule){
        redisTemplate.opsForValue().set(key,vaule);

    }

    public Object get(String key){
        Object o = redisTemplate.opsForValue().get(key);
        return o;
    }
}
